﻿using System.Security.Cryptography;
using System.Text;

namespace Utilities.Security.Cryptography
{
    public class MD5Hasher : IHasher
    {
        MD5 md5 = MD5CryptoServiceProvider.Create();

        public byte[] ComputeHash(string data)
        {
            return md5.ComputeHash(Encoding.Default.GetBytes(data));
        }
        public byte[] ComputeHash(byte[] data)
        {
            return md5.ComputeHash(data);
        }
    }
}
